package com.demo.dao;


import com.demo.pojo.Branch;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @ClassName ItemDao
 * @Description TODO
 * @Author Windy
 * @Date 2022/8/25 14:32
 * @Version 1.0
 **/
public interface ContractorDao {

    //通过cid获取对应的数据
    @Select("select * from contractor where cid=#{cid} and status=1")
    List<Branch> findContractorByCid(String cid);

    /**
     * 通过cid获取对应的数据的名称
     */
    @Select("select cname as contractorName from contractor where cid=#{cid} and status=1")
    String getNameByCid(String cid);
}
